home *** CD-ROM | disk | FTP | other *** search
- ************************************************************************
- *
- * June 1, 1987
- *
- * IfExists.asm Copyright 1987 Smythe and Realtime Associates
- *
- * Usage: IfExists <name>
- *
- * where <name> is any valid AmigaDos Device, Directory
- * or Filename.
- *
- * Sets a return code of 20 if object is not found
- * and returns a 0 is it is found.
- *
- * IfExists corrects a problem with the IF EXISTS construct as used in
- batch files or your startup-sequence.
-
- The problem was that if, for example, the line IF EXISTS DF3: were used
- in the startup-sequence, and DF3: were not mounted, a requestor would
- appear and the startup-sequence would stop and wait for a click on
- Cancel. This would not happen with directories, or files, only device
- names.
-
- IfExists circumvents this by fooling the system while it goes looking
- for its object. My thanks to John V. Pope for the original idea for
- this program and the original c source for this trick.
-
- A practical example, perhaps? (startup-sequence)
-
- Failat 25
- IfExists My_Disk:
- IF NOT ERROR
- Copy My_Disk:stuff to Ram:
- ENDIF
-
-
- This, to me, is the nicest thing about IfExists, that you can call
- a disk by name, and if it is not there, not get that damned requester.
-
- I have thoroughly tested this little goodie, and it seems to work as
- professed, but you are using it at your own risk, not mine.
-
- This code may be distributed, hacked, bashed and abused as long as you
- leave my name in it as original author( unless your hacks are REALLY
- ugly) and you do not charge more than $5.00 for any disk on which you
- distribute it. Permission to distribute is also granted to those selling
- disks for over $5.00 , but royalties of $0.50 per disk must be returned
- to the author.(When PD becomes profit I want a piece of the action)
-
- Questions, praise, complaints, suggestions, money to:
-
- Tom Smythe
- Real Time Associates
- 254 Ne.42nd
- Seattle, WN.
-
-